﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;

namespace Tsanie.OsuDevice.Components {
    //public enum ScrollType {
    //    HScroll,
    //    VScroll
    //}
    //public class ScrollEventArgs : EventArgs {
    //    public ScrollType ScrollType { get; set; }
    //}
    public class ListView : System.Windows.Forms.ListView {
        //[Description("滚动时触发")]
        //public event EventHandler<ScrollEventArgs> Scroll;

        public ListView()
            : base() {
            this.SetStyle(System.Windows.Forms.ControlStyles.OptimizedDoubleBuffer |
                System.Windows.Forms.ControlStyles.AllPaintingInWmPaint,
                true);
        }

        //protected override void WndProc(ref Message msg) {
        //    //   WM_HSCROLL                                             0x0114 
        //    //   WM_VSCROLL                                             0x0115 
        //    if (msg.Msg == 0x0114 || msg.Msg == 0x0115) {
        //        if (Scroll != null)
        //            Scroll(this, new ScrollEventArgs() {
        //                ScrollType = (msg.Msg == 0x0115 ? ScrollType.VScroll : ScrollType.HScroll)
        //            });
        //    }
        //    base.WndProc(ref msg);
        //}

    }
}
